home *** CD-ROM | disk | FTP | other *** search
- package java.nio;
-
- public abstract class MappedByteBuffer extends ByteBuffer {
- volatile boolean isAMappedBuffer;
-
- MappedByteBuffer(int var1, int var2, int var3, int var4, boolean var5) {
- super(var1, var2, var3, var4);
- this.isAMappedBuffer = var5;
- }
-
- MappedByteBuffer(int var1, int var2, int var3, int var4) {
- super(var1, var2, var3, var4);
- this.isAMappedBuffer = false;
- }
-
- private void checkMapped() {
- if (!this.isAMappedBuffer) {
- throw new UnsupportedOperationException();
- }
- }
-
- public final boolean isLoaded() {
- this.checkMapped();
- return this.address != 0L && this.capacity() != 0 ? this.isLoaded0(((DirectByteBuffer)this).address(), (long)this.capacity()) : true;
- }
-
- public final MappedByteBuffer load() {
- this.checkMapped();
- if (this.address != 0L && this.capacity() != 0) {
- this.load0(((DirectByteBuffer)this).address(), (long)this.capacity(), Bits.pageSize());
- return this;
- } else {
- return this;
- }
- }
-
- public final MappedByteBuffer force() {
- this.checkMapped();
- if (this.address != 0L && this.capacity() != 0) {
- this.force0(((DirectByteBuffer)this).address(), (long)this.capacity());
- return this;
- } else {
- return this;
- }
- }
-
- private native boolean isLoaded0(long var1, long var3);
-
- private native int load0(long var1, long var3, int var5);
-
- private native void force0(long var1, long var3);
- }
-